// eslint-disable-next-line quotes
import { Button, Layout, Menu, Tooltip, Spin, Steps, Row, Col, Pagination, Drawer, Table, Transfer, Form, Badge, DatePicker, Input, Select, Checkbox, Modal, Collapse, Radio, Cascader, TreeSelect, Tabs, Tree, Tag, InputNumber } from 'ant-design-vue'
import {
    Header,
    Column,
    Table as VxeTable,
    Grid,
    Toolbar,
    Filter,
    Tooltip as VxeTooltip,
    Icon as vxeIcon,
    Button as VxeButton,
    Select as VxeSelect,
    Modal as vxeModal,
    Input as vxeInput
    , VXETable
} from 'vxe-table'
import zhCN from 'vxe-table/es/locale/lang/zh-CN'
import XEUtils from 'xe-utils'
import VXETablePluginAntd from 'vxe-table-plugin-antd'
import 'vxe-table-plugin-antd/dist/style.css'
VXETable.setup({
    i18n: (key: any, args: any) => XEUtils.toFormatString(XEUtils.get(zhCN, key), args)
})
VXETable.use(VXETablePluginAntd as any)
export const registerAntdComponents: any = (app: any): void => {
    app.use(Button)
    app.use(Menu)
    app.use(Layout)
    app.use(Spin)
    // app.use(Icon)
    app.use(Row)
    app.use(Transfer)
    app.use(Col)
    app.use(Pagination)
    app.use(Form)
    app.use(Input)
    app.use(Tree)
    app.use(Radio)
    app.use(Select)
    app.use(Steps)
    app.use(Checkbox)
    app.use(Table)
    app.use(Modal)
    app.use(Collapse)
    app.use(Cascader)
    app.use(TreeSelect)
    app.use(DatePicker)
    app.use(Tabs)
    app.use(Tag)
    app.use(Badge)
    app.use(Drawer)
    app.use(InputNumber)
    app.use(Tooltip)

    // ------------------------------------------------------------------------------
    app.use(vxeIcon)
    app.use(Header)
    app.use(Column)
    app.use(Grid)
    app.use(Toolbar)
    app.use(VxeTable)
    app.use(VxeTooltip)
    app.use(VxeButton)
    app.use(vxeModal)
    app.use(vxeInput)
    app.use(VxeSelect)
    app.use(Filter)
}
